﻿
Shader "MayoHa/Lightning" {
    Properties {
        [HDR]_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
        _MainTex ("Particle Texture", 2D) = "white" {}

    }

    SubShader{
        Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane"}
        Blend SrcAlpha One
        ZWrite off Lighting off
        pass{
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #pragma target 3.0

            #include "UnityCG.cginc"

            sampler2D _MainTex;
            float4 _MainTex_ST;
            float4 _TintColor;


            struct a2v{
                float4 vertex : POSITION;
                float2 UV : TEXCOORD0;
            };

            struct v2f{
                float4 vertex : SV_POSITION;
                float2 uv : TEXCOORD0;
            };


            v2f vert(a2v v){
                v2f o;
                o.vertex = UnityObjectToClipPos(v.vertex);
                o.uv = TRANSFORM_TEX(v.UV,_MainTex);
                return o;
            }

            fixed4 frag(v2f i): SV_TARGET{
                float4 col = _TintColor * tex2D(_MainTex,i.uv);
                return col;
            }
            ENDCG
        }

    }
}

